count (one's) lucky stars

Translations
se dire qu'on a eu beaucoup de chance
Definitions
To be very grateful or thankful for good fortune or a favorable outcome, often in situations where things could have gone badly.